package com.sanron.sunweather.common;

import com.sanron.sunweather.R;

public class IconManager {
	/**
	 * 获取小图标 
	 */
	public static int getTypeSmallIcon(String type, boolean isDay) {
		int id = 0;
		if ("小雨".equals(type)) {
			id = R.drawable.sw_yu1;
		} else if ("小到中雨".equals(type)) {
			id = R.drawable.sw_yu2;
		} else if ("中雨".equals(type)) {
			id = R.drawable.sw_yu3;
		} else if ("中到大雨".equals(type)) {
			id = R.drawable.sw_yu4;
		} else if ("大雨".equals(type)) {
			id = R.drawable.sw_yu5;
		} else if ("大到暴雨".equals(type)) {
			id = R.drawable.sw_yu6;
		} else if ("暴雨".equals(type)) {
			id = R.drawable.sw_yu7;
		} else if ("阵雨".equals(type)) {
			id = isDay ? R.drawable.sw_zy_day : R.drawable.sw_zy_night;
		} else if ("雷阵雨".equals(type)) {
			id = R.drawable.sw_lzy;
		} else if ("雷阵雨伴有冰雹".equals(type)) {
			id = R.drawable.sw_lzy_bb;
		} else if ("雨夹雪".equals(type)) {
			id = R.drawable.sw_yu_xue;
		} else if ("小雪".equals(type)) {
			id = R.drawable.sw_xue1;
		} else if ("中雪".equals(type)) {
			id = R.drawable.sw_xue2;
		} else if ("大雪".equals(type)) {
			id = R.drawable.sw_xue3;
		} else if ("阵雪".equals(type)) {
			id = isDay ? R.drawable.sw_zx_day : R.drawable.sw_zx_night;
		} else if ("晴".equals(type)) {
			id = isDay ? R.drawable.sw_qin_day : R.drawable.sw_qin_night;
		} else if ("阴".equals(type)) {
			id = R.drawable.sw_yin;
		} else if ("多云".equals(type)) {
			id = isDay ? R.drawable.sw_dy_day : R.drawable.sw_dy_night;
		} else if ("浮尘".equals(type)) {
			id = R.drawable.sw_fuchen;
		} else if ("雾".equals(type)) {
			id = isDay ? R.drawable.sw_wu_day : R.drawable.sw_wu_night;
		} else if ("冻雨".equals(type)) {
			id = R.drawable.sw_donyu;
		} else {
			id = R.drawable.sw_undefined;
		}
		return id;
	}
	
	/**
	 * 获取天气类型图标
	 */
	public static int getTypeIcon(String type, boolean isDay) {
		int id = 0;
		if ("小雨".equals(type)) {
			id = R.drawable.w_yu1;
		} else if ("小到中雨".equals(type)) {
			id = R.drawable.w_yu2;
		} else if ("中雨".equals(type)) {
			id = R.drawable.w_yu3;
		} else if ("中到大雨".equals(type)) {
			id = R.drawable.w_yu4;
		} else if ("大雨".equals(type)) {
			id = R.drawable.w_yu5;
		} else if ("大到暴雨".equals(type)) {
			id = R.drawable.w_yu6;
		} else if ("暴雨".equals(type)) {
			id = R.drawable.w_yu7;
		} else if ("阵雨".equals(type)) {
			id = isDay ? R.drawable.w_zy_day : R.drawable.w_zy_night;
		} else if ("雷阵雨".equals(type)) {
			id = R.drawable.w_lzy;
		} else if ("雷阵雨伴有冰雹".equals(type)) {
			id = R.drawable.w_lzy_bb;
		} else if ("雨夹雪".equals(type)) {
			id = R.drawable.w_yu_xue;
		} else if ("小雪".equals(type)) {
			id = R.drawable.w_xue1;
		} else if ("中雪".equals(type)) {
			id = R.drawable.w_xue2;
		} else if ("大雪".equals(type)) {
			id = R.drawable.w_xue3;
		} else if ("阵雪".equals(type)) {
			id = isDay ? R.drawable.w_zx_day : R.drawable.w_zx_night;
		} else if ("晴".equals(type)) {
			id = isDay ? R.drawable.w_qin_day : R.drawable.w_qin_night;
		} else if ("阴".equals(type)) {
			id = R.drawable.w_yin;
		} else if ("多云".equals(type)) {
			id = isDay ? R.drawable.w_dy_day : R.drawable.w_dy_night;
		} else if ("浮尘".equals(type)) {
			id = R.drawable.w_fuchen;
		} else if ("雾".equals(type)) {
			id = isDay ? R.drawable.w_wu_day : R.drawable.w_wu_night;
		} else if ("冻雨".equals(type)) {
			id = R.drawable.w_donyu;
		} else {
			id = R.drawable.w_undefined;
		}
		return id;
	}
	
	/**
	 * 生活指数图标
	 */
	public static int getLifeIndexIcon(String name){
		int id = 0;
		if ("穿衣指数".equals(name)) {
			id = R.drawable.life_4;
		} else if ("晨练指数".equals(name)) {
			id = R.drawable.life_2;
		} else if ("舒适度指数".equals(name)) {
			id = R.drawable.life_3;
		} else if ("感冒指数".equals(name)) {
			id = R.drawable.life_7;
		} else if ("晾晒指数".equals(name)) {
			id = R.drawable.life_12;
		} else if ("旅游指数".equals(name)) {
			id = R.drawable.life_19;
		} else if ("紫外线指数".equals(name)) {
			id = R.drawable.life_20;
		} else if ("洗车指数".equals(name)) {
			id = R.drawable.life_22;
		} else if ("运动指数".equals(name)) {
			id = R.drawable.life_24;
		} else if ("约会指数".equals(name)) {
			id = R.drawable.life_25;
		} else if ("雨伞指数".equals(name)) {
			id = R.drawable.life_26;
		} else if ("化妆指数".equals(name)) {
			id = R.drawable.life_18;
		} else if ("太阳镜指数".equals(name)) {
			id = R.drawable.life_28;
		} 
		return id;
	}
}
